<?php

namespace Summer\Hjd\Updates;


use Illuminate\Support\Carbon;
use Summer\Hjd\Models\ChangeModel;
use Summer\Hjd\Models\LevelsModel;
use Summer\Hjd\Models\LeveluModel;
use Winter\Storm\Database\Updates\Seeder as BaseSeeder;

use Summer\Hjd\Models\CurrencyModel;


class Seeder extends BaseSeeder
{

    public function run()
    {
        $now=Carbon::now();
        //增加通用币种
        $currency=CurrencyModel::insert([
            [
                'slug' => 'cash',
                'title' => '现金钱包',
                'status' => 1,
                'price' => 1,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'bonus',
                'title' => '佣金钱包',
                'status' => 1,
                'price' => 1,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'score',
                'title' => '积分钱包',
                'status' => 1,
                'price' => 1,
                'created_at' => $now,
                'updated_at' => $now,
            ]
        ]);
        //增加用户级别
        $levelu=LeveluModel::insert([
            [
                'code' => 1,
                'title' => '会员',
                'status' => 1,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'code' => 2,
                'title' => 'VIP会员',
                'status' => 1,
                'created_at' => $now,
                'updated_at' => $now,
            ]
        ]);
        //增加星级级别
        $levels=LevelsModel::insert([
            [
                'code' => 1,
                'title' => '一星会员',
                'status' => 1,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'code' => 2,
                'title' => '二星会员',
                'status' => 1,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'code' => 3,
                'title' => '三星会员',
                'status' => 1,
                'created_at' => $now,
                'updated_at' => $now,
            ]
        ]);
        //增加流水类型
        $change = ChangeModel::insert([
            [
                'slug' => 'admin_add',
                'title' => '后台充值',
                'status' => 1,
                'inc_exp' => 0,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'admin_red',
                'title' => '后台扣除',
                'status' => 1,
                'inc_exp' => 0,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'home_rg',
                'title' => '前台充值',
                'status' => 1,
                'inc_exp' => 0,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'transfer_add',
                'title' => '转币增加',
                'status' => 1,
                'inc_exp' => 0,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'transfer_red',
                'title' => '转币扣除',
                'status' => 1,
                'inc_exp' => 0,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'with_red',
                'title' => '提现扣除',
                'status' => 1,
                'inc_exp' => 0,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'with_back',
                'title' => '提现拒批',
                'status' => 1,
                'inc_exp' => 0,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'order_pay',
                'title' => '订单支付',
                'status' => 1,
                'inc_exp' => 0,
                'created_at' => $now,
                'updated_at' => $now,
            ],
            [
                'slug' => 'order_cancel',
                'title' => '订单取消',
                'status' => 1,
                'inc_exp' => 0,
                'created_at' => $now,
                'updated_at' => $now,
            ]
        ]);

    }

}
